package com.system.base.files.model;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 *
 * 文件信息
 *
 * @author 江路
 **/
@Data
public class SysFiles implements Serializable {
    @Schema(description = "文件ID")
    @Min(value = 0,message = "fileId必须大于0")
	@NotNull(message = "fileId字段必填")
    private Long fileId;

    @Schema(description = "文件名称")
    private String fileName;

    @Schema(description = "相对路径")
    private String relativePath;

    @Schema(description = "绝对路径")
    private String absolutePath;

    @Schema(description = "文件hash值")
    private String fileHash;

    @Schema(description = "缩略图相对路径")
    private String thumbRelativePath;

    @Schema(description = "缩略图绝对路径")
    private String thumbAbsolutePath;

    @Schema(description = "缩略图Hash")
    private String thumbHash;

    @Schema(description = "记录创建时间")
    private Date createTime;

    @Schema(description = "记录更新时间")
    private Date updateTime;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table sys_files
     *
     * @mbg.generated
     */
    private static final long serialVersionUID = 1L;

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sys_files
     *
     * @mbg.generated
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(" {");
        sb.append("\"ClassName\" : \"").append(getClass().getSimpleName());
        sb.append("\",\"Hash\" : ").append(hashCode());
        sb.append(", \"fileId\" : ").append(fileId);
        sb.append(", \"fileName\" : ").append("\""+fileName+"\"");
        sb.append(", \"relativePath\" : ").append("\""+relativePath+"\"");
        sb.append(", \"absolutePath\" : ").append("\""+absolutePath+"\"");
        sb.append(", \"fileHash\" : ").append("\""+fileHash+"\"");
        sb.append(", \"thumbRelativePath\" : ").append("\""+thumbRelativePath+"\"");
        sb.append(", \"thumbAbsolutePath\" : ").append("\""+thumbAbsolutePath+"\"");
        sb.append(", \"thumbHash\" : ").append("\""+thumbHash+"\"");
        sb.append(", \"createTime\" : ").append("\""+createTime+"\"");
        sb.append(", \"updateTime\" : ").append("\""+updateTime+"\"");
        sb.append(", \"serialVersionUID\" : ").append(serialVersionUID);
        sb.append("}");
        return sb.toString();
    }
}